package com.dameng.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dameng.system.entity.SystemUser;
import com.dameng.system.mapper.SystemUserMapper;
import com.dameng.system.service.SystemUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements SystemUserService {

    @Resource
    SystemUserMapper systemUserMapper;

    @Override
    public Page<SystemUser> queryPage(Page<SystemUser> page, SystemUser systemUser) {
        return page.setRecords(systemUserMapper.selectUserList(page, systemUser));
    }

    @Override
    public Page<SystemUser> getUserList(Page<SystemUser> page, SystemUser systemUser) {
        return systemUserMapper.getUserList(page, systemUser);
    }

    @Override
    public SystemUser getUserAndDept(QueryWrapper<SystemUser> wrapper) {
        return systemUserMapper.getUserAndDept(wrapper);
    }
}
